<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>7、请应⽤ prototype 写⼀个类继承多个类的案例</title>
</head>

<body>
  <script>
    function ClassA() {
      this.a = 'a';

    }
    function ClassB() {
      this.b = 'b';

    }
    ClassB.prototype = new ClassA();
    var objB = new ClassB();
    for (var p in objB) {
      console.log(p)
    }
  </script>
</body>